
<%
	/**
	 * 默认列表
	 * @author ZmSoft
	 * @version 0.1.0
	 * @since 0.1.0 2018/4/2
	 */
%>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/WEB-INF/tag/pagetag.tld" prefix="p"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ww.XXAabb.cc</title>
<!-- 静态引入 -->
<c:import url="/WEB-INF/views/config/include.jsp" charEncoding="UTF-8" />
<style type="text/css">
.btn_tr {
	cursor: pointer;
	border-bottom: 1px solid #e6e6e6;
}

.btn_tr:hover {
	background-color: #3eb94e;
	color: white;
}
td:hover {
	color: white;
}
.list {
    height: 56px;
	border-bottom: 1px solid #e6e6e6;
}
.title {
	height: 26px;
	margin-left: 20px;
	margin-top: 5px;
}

.detail {
	height: 26px;
	text-align: right;
	margin-right: 20px;
}

.button {
    width: 200px;
    height: 26px;
    position: absolute;
    margin-top: -46px;
    right: 198px;
}
.item{
	float: right;
	margin-left: 12px;
}
</style>
</head>

<body class="body">
	<table style="width: 100%">
		<thead>
			<tr>
				<th>
					<div style="float: left; width: 300px; height: 32px; line-height: 32px">
						<i class="icon ZM-Web-icon-font">&#xe614;</i> 
						<span style="font-size: 22px">最新 </span> 
						<i class="icon ZM-Web-icon-font">&#xe612;</i>
						<span style="font-size: 13px"> (总量：${page.resultCount})</span> 
					</div>
					<div style="float: right; width: 30px; height: 32px; line-height: 32px; cursor: pointer;" onclick="showSearchModal()">
						<i class="icon ZM-Web-icon-font">&#xe633;</i>
					</div>
				</th>
			</tr>
		</thead>
		<tbody>
			<p:nodata items="${page.pageListData}" size="1" />
			<c:forEach var="item" items="${page.pageListData}" varStatus="status">
				<tr class="btn_tr">
					<td>
						<div class="list" onclick="showPageForm('/h5/info/${item.puk}')">
							<div class="title">${item.title}</div>
							<div class="detail">
								${item.onlineTime}
							</div>
						</div>
						<div class="button">
							<table>
								<tr>
									<td style="text-align: right;"  onclick="showTagDatas('${item.fb5}')">${item.eb5}</td>
									<td style="width: 36px;text-align: right;" onclick="showShareModal('${item.title}','${item.puk}')">
										<i class="icon ZM-Web-icon-font">&#xe624;</i>
									</td>
									<td style="width: 36px;text-align: right;">
										<c:if test="${(item.onlineTime)!= null && fn:indexOf(item.onlineTime, date) > -1}">
										<i class="icon ZM-Web-icon-font">&#xe629;</i>
										</c:if>
									</td>
								</tr>
							</table>
						</div>
					</td>
				</tr>
			</c:forEach>
			<tr>
				<td><p:page page="${page}" type="7" url="/10111010" show="1111" /></td>
			</tr>
		</tbody>
	</table>
<!-- 这里是检索对话框 -->
<form action="/10111010?token=${token}" id="blankForm" name="blankForm" method="POST"> 
    <input type="hidden" name="token" id="token" value="${token}">
	<input type="hidden" name="pageCurrent" id="pageCurrent" value="${page.pageCurrent}"> 
	<input type="hidden" name="pageLimit" id="pageLimit" value="${page.pageLimit}">
	<input type="hidden" name="classifyId" id="classifyId" value="1000">
	<input type="hidden" name="tagId" id="tagId" value="">
<div class="modal fade" id="searchModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">请输入</h4>
            </div>
            <div class="modal-body">
            	<div>
    				<input type="text" class="form-control" name="pv1" id="pv1" >
    			</div>
            </div>
            <div class="modal-footer">
            	<button type="submit" class="btn btn-primary tdblank80" >检索</button>
            </div>
        </div>
    </div>
</div>
</form>
<!-- 这里是分享对话框 -->
<div class="modal fade" id="shareModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">下载地址</h4>
            </div>
            <div class="modal-body">
                <div class="pay-qrcode" id="spread_code" >
                    <div>
                        <span style="font-size:20px;font-width:bolder;">该资源的分享地址如下:</span>
                    </div>
                    <div>
                		<h3 style="text-align: center; color: red" id="shareMessage"></h3>
                    </div>
                    <div style="text-align: center; ">
                        <img src="" id="wxQrcode"/>
                    </div>
                </div>
                
            </div>
            <div class="modal-footer">
            	<input type="text" id="shareUrl" >
            	<button type="button" class="btn" data-dismiss="modal1" data-clipboard-demo data-clipboard-target="#shareUrl">复制</button>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">
///数据检索
function showSearchModal(){
	$('#pv1').val("");
	$("#searchModal").modal('show');
}
///数据分类
function showTagDatas(tagId){
	$('#tagId').val(tagId);
	blankForm.submit();
}
function showShareModal(title,materialId){
	$('#myModalLabel').empty().text("【"+title+"】");
    $('#shareMessage').empty().text("识别码："+materialId);
    //分享地址
    var url='http://pp.xxaabb.cc/h5/share/'+materialId;
	$('#shareUrl').val("【"+ title + "】" + '的下载地址在这里' + url);
	//二维码
    var imgUrl='/99999031/220/220?content='+url;
    $('#wxQrcode').attr("src",imgUrl);
    
    $("#shareModal").modal('show');
}

var clipboard = new ClipboardJS('.btn');
clipboard.on('success', function(e) {
	$('#shareUrl').val("复制成功！！！");
    e.clearSelection();
});

clipboard.on('error', function(e) {
	$('#shareUrl').val("复制失败！！！");
});
</script>
<script src="/resources/views/js/page.js"></script>

<div style="display: none">
<!-- 统计代码横排数据显示 -->
<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1274337631'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s13.cnzz.com/z_stat.php%3Fid%3D1274337631%26online%3D1' type='text/javascript'%3E%3C/script%3E"));</script>
</div>

</body>

</html>